package com.gingko.duominuo.data.source.local.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.gingko.duominuo.data.model.UserVo

@Dao
interface UserDao {
    @Insert
    suspend fun insertUser(vararg userVos: UserVo)

    @Update
    suspend fun updateUser(vararg userVos: UserVo)

    @Query("SELECT * FROM user where account == :account")
    suspend fun queryUser(account: String): UserVo?

    @Query("SELECT * FROM user where account == :account")
    suspend fun update(account: String): UserVo?

    @Query("UPDATE user SET jobId= :jobId WHERE account = :userId")
    fun updateUserJobId(userId: String?, jobId: String): Int
}
